package com.tally.user.controller;

import com.tally.server.dto.LoginPageDTO;
import com.tally.server.dto.PageDTO;
import com.tally.server.dto.ResponseDTO;
import com.tally.server.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: sy
 * @Date: 2021/2/1 22:00
 * @Description:
 */
@RestController
@RequestMapping("/login")
public class LoginController {
    public static final String BUSINESS_NAME = "登录记录";

    @Autowired
    private LoginService loginService;

    @RequestMapping("/list")
    public ResponseDTO list(@RequestBody LoginPageDTO loginPageDTO){
        loginService.list(loginPageDTO);
        return ResponseDTO.success(loginPageDTO);
    }
}
